package dk.itu.spct;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetAddress;
import java.net.Socket;

public class TestingNFCClient {
	public static void main (String args[]) throws Exception{
	
		int serverPort = 34567;
	
		InetAddress serverAddress;
		try {
			serverAddress = InetAddress.getByName("localhost");
			Socket socket = new Socket(serverAddress, serverPort);
			
		    InputStream is = socket.getInputStream();
		    DataInputStream dis = new DataInputStream(is);
		    int value = dis.readInt();
		    System.out.println("Value: " + value);
		    
		    dis.close();
	        is.close();
	        socket.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
